import http from '@/api/index'
/* 分页查询 */
export function selectByPage (params) {
  return http.get('/user/list', { params })
}
/* 按 id 查询 */
export function selectById (id) {
  return http.get('/user/' + id)
}
/* 根据 id 数组查询 */
export function selectByIds (ids) {
  let params = [...ids]
  params = params.toString()
  return http.get('/user?ids=' + params)
}

/* 新增 */
export function insert (data) {
  return http.post('/user', data)
}
/* 修改 */
export function update (data) {
  return http.put('/user', data)
}
/* 删除 */
export function remove (id) {
  return http.delete('/user/' + id)
}
